<?php
class Language_model extends CI_Model{
	
	/**
	 * 
	 * Get all languages in database
	 */
	public function getAll(){
		$data = array();
		$q = $this->db->get_where('languages',array('public' => '1'));
		if($q->num_rows()){
			foreach ($q->result_array() as $row) {
				$data[] = $row;
			}
		}
		
		$q->free_result();
		return $data;
	}
}